//
//  BJDefine.h
//  BaoJunNewEnergy
//
//  Created by 9s on 2018/3/22.
//  Copyright © 2018年 SGMW. All rights reserved.
//

#ifndef BJDefine_h
#define BJDefine_h

#define ScreenHeight [[UIScreen mainScreen] bounds].size.height//获取屏幕高度，兼容性测试
#define ScreenWidth [[UIScreen mainScreen] bounds].size.width//获取屏幕宽度，兼容性测试
#define KAPPDelegate (AppDelegate*)[[UIApplication sharedApplication]delegate]
#define WEAK_SELF __weak typeof(self)weakSelf = self
#define STRONG_SELF __strong typeof(weakSelf)self = weakSelf

#define iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
//导航高度
#define KNavHeight (iPhoneX?88:64)
// 适配iPhone x 底栏高度
#define TabbarHeight ([[UIApplication sharedApplication] statusBarFrame].size.height>20?83:49)
#define IOS11 @available(iOS 11.0, *)
//安全区域高度
#define SafeAreaHeight (ScreenHeight == 812.0 ? 34 : 0)
//状态栏高度
#define KStateHeight (iPhoneX?44:20)

#define RGB(r,g,b) RGBA(r,g,b,1.0f)
#define Color(a) [UIColor colorWithHexString:a]
#define RGBA(r,g,b,a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)]
#define FONT_SIZE(s) [UIFont systemFontOfSize:s]

#endif /* BJDefine_h */
